#include "mainwindow.h"
#include "ui_mainwindow.h"

#include "mytablemodel.h"
#include "mystyleditemdelegate.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    MyTableModel *model = new MyTableModel(this);
    ui->tableView->setModel(model);
    ui->tableView_2->setModel(model);

    MyStyledItemDelegate *delegate = new MyStyledItemDelegate(this);
    ui->tableView_2->setItemDelegate(delegate);
}

MainWindow::~MainWindow()
{
    delete ui;
}

